package procedure;

import screen.Screen;

import java.util.List;

/**
 * @author sk.z
 * 非线程安全,注意只能在单线程环境下使用.
 */
public class Show {

    public static void process(Node process){
        System.out.println("---------------------------------");
        new Screen(process).print();
        System.out.println("---------------------------------");
        System.out.println("");
    }

    public static void subSerial(List<Node> list){
        System.out.print("串行流程:");
        for (Node n : list){
            System.out.print(n.show()+" ");
        }
        System.out.println();
    }

    public static void subParallel(List<Node> list){
        System.out.print("并行流程:");
        for (Node n : list){
            System.out.print(n.show()+" ");
        }
        System.out.println();
    }

    public static void singleLine(List<Node> list){
        for (Node n : list){
            System.out.print(n.show()+"->");
        }
        System.out.println();
    }

}
